#pragma once

#include <iostream>

using namespace std;

class StringBad
{
private:
	char *str;						// pointer to string
	int len;						// lenght of string
	static int num_strings;			// number of objects
	static const int CINLIM = 80;	// cin input limit

public:
	// constructors and others methods
	StringBad(const char* s);
	StringBad(const StringBad& st);
	StringBad();
	~StringBad();
	int length() const {
		return len;
	}

	// overloaded operator methods
	StringBad & operator=(const StringBad& st);
	StringBad & operator=(StringBad&& st);
	StringBad & operator=(const char * c);
	char & operator[](int i);
	const char & operator[](int i) const;

	// overloaded operator friends
	friend bool operator<(const StringBad& st1, const StringBad& st2);
	friend bool operator>(const StringBad& st1, const StringBad& st2);
	friend bool operator==(const StringBad& st1, const StringBad& st2);
	friend ostream & operator<<(ostream& os, const StringBad& st);
	friend istream & operator>>(istream& is, StringBad& st);

	// static function
	static int HowMany();
};
